<template>
  <div class="writemsg">
    <Header title="健康档案卡" />
    <div class="content">
      <li v-for="(item,index) in arr" :key="index" v-if="typeof item.text !=='222'">
        <span>{{item.sub}}</span>
        <input type="text" :placeholder="item.text?'请选择':'请输入'" />
        <span style="float:right" :class="item.text?'iconfont icon-icon-test2':''"></span>
      </li>
      <p v-else>
        <span class="iconfont icon-icon-test"></span>
        {{item.sub}}
      </p>
    </div>
    <button class="btn" @click="$router.push({ path: arr.pop().path })">保存</button>
  </div>
</template>
<script lang="ts">
import Vue from "vue";
export default Vue.extend({
  props: ["arr"],
});
</script>
<style scoped>
p {
  text-align: center;
  background: #eee;
  padding: 10px 0;
}
</style>